<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title th:text="${sectionName}">个人中心</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../ccss/bootstrap-theme.min.css">
    <link rel="stylesheet" href="../ccss/community.css">
    <script src="../cjs/jquery.min.js" type="application/javascript"></script>
    <script src="../cjs/bootstrap.js" type="application/javascript"></script>
</head>
<body>
<div th:replace="~{navigation::nav}"></div>
<div class="container-fluid main profile">
    <div class="row">
        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
            <h2 th:text="${sectionName}">发现</h2>
            <hr>
            <div class="media" th:each="question:${pages.questions}">
                <div class="media-left">
                    <a href="#">
                        <img class="media-object img-rounded" th:src="${question.user.avatarUrl}" src="...">
                    </a>
                </div>
                <div class="media-body">
                    <h4 class="media-heading" th:text="${question.title}">怎么快速学号 Spring Boot 开发</h4>
                    <span th:text="${question.description}">点击进入看 小匠 录制的视频</span><br>
                    <span class="text-desc"><span th:text="${question.commentCount}">2</span> 个回复 • <span th:text="${question.viewCount}">31</span> 次浏览 • <span th:text="${#dates.format(question.gmtCreate,'yyyy-MM-dd')}"></span></span>
                </div>
            </div>
            <nav aria-label="Page navigation">
                <ul class="pagination" >
                    <li th:if="${pages.showFirstPage}">
                        <a th:href="@{'/profile/'+${section}(page=1)}" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li th:if="${pages.showPrevious}">
                        <a href="#" th:href="@{'/profile/'+${section}(page=${pages.page}-1)}" aria-label="Previous">
                            <span aria-hidden="true">&lt;</span>
                        </a>
                    </li>
                    <li th:class="${pages.page==page}?'active':''" th:each="page:${pages.pages}"><a href="/" th:href="@{'/profile/'+${section}(page=${page})}" th:text="${page}" >1</a></li>
                    <li th:if="${pages.showNext}">
                        <a href="#" th:href="@{'/profile/'+${section}(page=${pages.page}+1)}" aria-label="Previous">
                            <span aria-hidden="true">&gt;</span>
                        </a>
                    </li>
                    <li th:if="${pages.showEndPage}">
                        <a href="#" th:href="@{'/profile/'+${section}(page=${pages.totalPage})}" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
        <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
            <div class="list-group section">
                <a href="/profile/questions" class="list-group-item active" th:classappend="${section=='questions'}?'active':''">我的问题</a>
                <a href="/profile/replies" class="list-group-item" th:classappend="${section=='replies'}?'active':''">
                    <span class="badge">14</span>最新回复</a>
            </div>

        </div>
    </div>
</div>
</body>
</html>